Problem Note 66647: Trying to subset a Google BigQuery table based on a Boolean variable might result in a performance issue
When you try to subset a Google BigQuery table based on a Boolean variable, you might experience slow performance. This issue occurs because SAS® software does not have a Boolean data type, so it uses a numeric data type in which 1 is true and 0 is false. When SAS tries to pass the query to BigQuery, it includes the comparison syntax as entered in SAS. The BigQuery database expects to see variable = true and not variable = 1. This behavior results in BigQuery issuing an error similar to the following:
ERROR: [42000] Error: googleapi: Error 400: No matching signature for operator = for argument types: BOOL, INT64. Supported signatures: ANY = ANY at [1:70], invalidQuery
As a result of the BigQuery error, SAS removes the comparison in the second query that is passed to the database. If the query also included a join, order by, summarization, or a DISTINCT keyword, then that item might also be removed from the second query that is passed to the database. In most cases, the BigQuery error is not written to the SAS log to indicate that there was problem, so it is likely that there will be no indication that any of this has occurred. The SASTRACE output will incorrectly indicate that the query was processed by database.
Due to the probable increase in the number of rows being read and more of the processing of the query being done by SAS rather than in the database, the query might take longer than if all of the processing had been done by the database.
Operating System and Release Information
SAS System | SAS/ACCESS Interface to Google BigQuery | Linux for x64 | V.03.05 | 2020.1.1 | Viya | Viya |
SAS System | SAS Data Connector to Google BigQuery | Linux for x64 | V.03.05 | 2020.1.1 | Viya | Viya |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Problem Note |
Priority: | high |
Date Modified: | 2020-09-16 10:05:48 |
Date Created: | 2020-09-15 08:58:40 |